package stream;

import java.util.Optional;

/**
 * Project: tobe-better-coder
 * Package: stream
 *
 * @author : Mr.xu
 * @date : 2023/9/20 22:21
 */
public class OptionalTest {
    public static void main(String[] args) {
        Apple apple = new Apple();
        apple = null;
        Optional<Apple> appleOptional = Optional.ofNullable(apple);
        System.out.println(appleOptional.isPresent());
    }
}